package main

import (
	_ "flashapi/routers"
	_ "flashapi/sysinit"
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/plugins/cors"
)

func main() {
	beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
		AllowOrigins:     []string{"*"},
		AllowMethods:     []string{"PUT", "PATCH","GET","POST"},
		AllowHeaders:     []string{"Origin"},
		ExposeHeaders:    []string{"Content-Length"},
		AllowCredentials: true,
	}))
	beego.SetStaticPath("/static", "static")
	//beego.BConfig.WebConfig.TemplateLeft="{{{"
	//beego.BConfig.WebConfig.TemplateRight="}}}"
	beego.Run()
}
